from selenium import webdriver  
driver = webdriver.PhantomJS()  
driver.get("http://www.baidu.com")  
data = driver.title  
print data 